<template>
	<view class="success">
		<view class="tips u-text-center">
			<image class="logo" src="../static/images/success.png" mode=""></image>
			<h3>已提交</h3>
		</view>
		<u-row gutter="270">
			<u-col span="12">
				<view class="txt  u-text-center">{{ info.name }}</view>
				<view class="txt u-text-center">{{ info.title }}</view>
			</u-col>
		</u-row>
		<u-row gutter="150">
			<u-col span="12">
				<view class="butBack">
					<u-button type="primary" @click="openProject" shape="circle">返回工程页</u-button>
				</view>
				<u-button plain @click="backHome" shape="circle">返回首页</u-button>
			</u-col>
		</u-row>
	</view>
</template>

<script>
	export default {
		name: 'createProjectSuccess',
		data() {
			return {
				info: ''
			}
		},
		onLoad(e) {
			this.info = JSON.parse(e.info)
		},
		methods: {
			// 返回首页
			backHome() {
				this.$navJump.reLaunch('../pages/index/index')
			},
			// 打开工程页面
			openProject() {
				this.$navJump.reLaunch('./projectDetails?idx=' + this.info.projectId)
			}
		},
		onShow() {
			// 去除左上角小房子图标
			wx.hideHomeButton()
		}
	}
</script>

<style lang="scss" scoped>
	.success {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-color: #FFFFFF;
		.tips {
			margin: 140rpx 0 15rpx;
			.logo {
				width: 140rpx;
				height: 140rpx;
			}
			h3 {
				font-size: 30rpx;
				color: #272727;
			}
		}
		/deep/.u-input--border {
			border-radius: 50rpx!important;
		}
		/deep/.u-input__input {
			color: #8C8C8C!important;
		}
		.but{
			position: absolute;
			right: -135rpx;
			top: 0;
			z-index: 2;
			width: 174rpx;
			height: 88rpx;
			line-height: 88rpx;
			text-align: center;
			border-radius: 0 50rpx 50rpx 0;
			background-color: #EBF3FF;
			color: #3C86FE;
			border: 2rpx solid #3CBCFE;
		}
		.txt {
			color: #8C8C8C;
			font-size: 26rpx;
			display: block;
		}
		.butBack {
			margin: 350rpx 0 50rpx;
			/deep/.u-btn--primary{
				background:linear-gradient(to right ,#3B85FE, #3BC0FE)!important
			}
		}
		/deep/.u-btn--default {
			border-color: #3B85FE!important;
			color: #3B85FE!important;
		}
	}

</style>
